<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html>
<html lang="en">
<head>
	<base href="<%=basePath%>">
	<meta charset="utf-8" />
	<meta name="viewport" content="width=device-width, initial-scale=1.0" />
	<!-- basic styles -->
	<link rel="stylesheet" href="assets/css/bootstrap.min.css" />
	<link rel="stylesheet" href="assets/css/bootstrap-responsive.min.css" />
	<link rel="stylesheet" href="assets/css/font-awesome.min.css" />
	<!-- 下拉框 -->
	<link rel="stylesheet" href="assets/css/chosen.css" />
</head>
<body>
	<form id="addForm" action="category/category_update.do" method="post">
		<div class="alert alert-info" style="margin-top:2px;margin-bottom:5px;height:40px;padding-top:10px;padding-bottom:10px;">
			<i class="icon-hand-right"></i>注意：标*的字段为必填项！
		</div>
		<table style="width:100%;border-collapse:separate;border-spacing:5px;margin-top: 30px;">
			<tr>
				<td>名称</td>
				<td><input type="text" name="name"  id="name" value="${ category.name}" maxlength="50"  class="col-xs-10 col-sm-5"/>&nbsp;<span style="color: red">*</span></td>
			</tr>
			<tr>
				<td style="float:center;text-align:center;height:60px;" colspan="2">
					<button type="button" onclick="saveBattery();" class="btn btn-info btn-sm "><i class="icon-edit bigger-120">&nbsp;&nbsp;</i>提交</button>
					<button type="button" onclick="top.Dialog.close();" class="btn btn-info btn-sm "><i class="icon-lightbulb bigger-120">&nbsp;&nbsp;</i>取消</button>
				</td>
			</tr>
		</table>
	</form>
<script type="text/javascript" src="assets/js/jquery-1.10.2.min.js"></script>
	<!-- 引入 -->
	<script type="text/javascript" src="assets/js/bootstrap.min.js"></script>
	<!-- 下拉框 -->
	<script type="text/javascript" src="assets/js/chosen.jquery.min.js"></script>
	<!--提示框-->
	<script type="text/javascript" src="assets/js/jquery.tips.js"></script>
	<script type="text/javascript">
	
		$(function() {
			$("table tr").find("td:eq(0)").width(50);
		});
		function saveBattery() {
			if ($("input[name='name']").val() == "") {
				showTips($("input[name='name']"), '请填写直播类别！');
				return false;
			}
			$("#addForm").submit();
		};
		function showTips(obj, tips) {
			obj.tips({
				side : 3,
				msg : tips,
				bg : '#e69138',
				time : 2
			});
		}
	</script>
</body>
</html>